apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
  name: sample
spec:
  hosts: 
    - {name: master, address: {{ hostvars[groups['kube-master'][0]].inventory_hostname }}, internalAddress: {{ hostvars[groups['kube-master'][0]].inventory_hostname }}, user: root, privateKeyPath: "~/.ssh/id_rsa"}
{% for host in groups['kube-nodes'] %}
    - {name: node{{ loop.index }}, address: {{ hostvars[host].inventory_hostname }}, internalAddress: {{ hostvars[host].inventory_hostname }}, user: root, privateKeyPath: "~/.ssh/id_rsa"}
{% endfor %}
  roleGroups:
    etcd:
    - master
    master:
    - master
    worker:
{% for host in groups['kube-nodes'] %}
    - node{{ loop.index }}
{% endfor %} 
  controlPlaneEndpoint:
    domain: lb.primihub.local
    address: ""
    port: 6443
  registry:
{% if mode == "online" %}
    privateRegistry: {{ harbor_registry }}
{% endif %}
    registryMirrors: []
    insecureRegistries: []    
  kubernetes:
    version: v1.20.4
    clusterName: cluster.local
    autoRenewCerts: true
    containerManager: docker
  etcd:
    type: kubekey
  network:
    plugin: calico
    calico:
      ipipMode: Never
      vxlanMode: Always
      vethMTU: 1440
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
    ## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
    multusCNI:
      enabled: false
  addons: []


